﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bdcs.Core.Entity
{
    /// <summary>
    /// wxgm_devPackDetl数据模型对象
    /// </summary>
    [Serializable]
    public partial class wxgm_devPackDetlMod
    {
        /// <summary>
        /// 初始化wxgm_devPackDetl数据模型对象
        /// </summary>
        public wxgm_devPackDetlMod()
        {
            
        }
        /// <summary>
        /// 初始化wxgm_devPackDetl数据模型对象并给所有字段赋值
        /// </summary>
        /// <param name="id">Id</param>
        /// <param name="deviceNo">DeviceNo</param>
        /// <param name="cTime">CTime</param>
        public wxgm_devPackDetlMod(long id,string deviceNo,DateTime cTime)
        {
            //给Id字段赋值
            this.Id = id;
            //给DeviceNo字段赋值
            this.DeviceNo = deviceNo;
            //给CTime字段赋值
            this.CTime = cTime;
        }
        
		//属性存储数据的变量
        private long _id;
        private string _deviceNo;
        private DateTime _cTime;
        
        /// <summary>
        /// Id
        /// </summary>
        public long Id
        {
            get { return this._id; }
            set { this._id = value; }
        }
        /// <summary>
        /// DeviceNo
        /// </summary>
        public string DeviceNo
        {
            get { return this._deviceNo; }
            set { this._deviceNo = value; }
        }
        /// <summary>
        /// CTime
        /// </summary>
        public DateTime CTime
        {
            get { return this._cTime; }
            set { this._cTime = value; }
        }
        
        /// <summary>
        /// 对比两个wxgm_devPackDetl数据模型对象是否一致
        /// </summary>
        /// <param name="obj">要进行比对的wxgm_devPackDetl数据模型对象</param>
        /// <returns>返回是否一致，为true一致，为false不一致</returns>
        public override bool Equals(object obj)
        {
            //判断传入对象是否为null
            if (obj == null) return false;
            //将传入对象转换成wxgm_devPackDetl数据模型对象
            wxgm_devPackDetlMod wxgm_devPackDetlMod = obj as wxgm_devPackDetlMod;
            //判断是否转换成功
            if (wxgm_devPackDetlMod == null) return false;
            //进行匹配属性的值
            return
                //判断Id是否一致
                this.Id == wxgm_devPackDetlMod.Id &&
                //判断DeviceNo是否一致
                this.DeviceNo == wxgm_devPackDetlMod.DeviceNo &&
                //判断CTime是否一致
                this.CTime == wxgm_devPackDetlMod.CTime;
        }
        /// <summary>
        /// 将当前wxgm_devPackDetl数据模型对象转换成哈希码
        /// </summary>
        /// <returns>哈希值</returns>
        public override int GetHashCode()
        {
            //将wxgm_devPackDetl数据模型对象的属性进行按位异或运算处理得到哈希码并返回
            return
                //将Id进行按位异或运算处理
                this.Id.GetHashCode() ^
                //将DeviceNo进行按位异或运算处理
                (this.DeviceNo == null ? 2147483647 : this.DeviceNo.GetHashCode()) ^
                //将CTime进行按位异或运算处理
                this.CTime.GetHashCode();
        }
        /// <summary>
        /// 将当前wxgm_devPackDetl数据模型对象转换成字符串副本【仅显示在SQL中不能为空的列】
        /// </summary>
        /// <returns>字符串形式副本</returns>
        public override string ToString()
        {
            //将当前wxgm_devPackDetl数据模型对象转换成字符串副本
            return
                "[" +
                //将Id转换成字符串
                this.Id + "," +
                //将DeviceNo转换成字符串
                this.DeviceNo + "," +
                //将CTime转换成字符串
                this.CTime +
                "]";
        }
    }
}
